working on optimization in group setting