Added group to calculate method