Added function to check if group is valid
Added function to get cells in same group as current input