routines for creating groups over an alignment