implemented group check