renamed uc show_all_groups_of_phase to find_all_groups_of_phase and refactored it