Added logic for multiple group projecting