removed getId from group object and cleaned code