Determine groups and stage