addition of groups and groupsize parameters to query method of ResourcePlan.