Completed the group pattern functionality