updated services code to add group functionality