created stored procedure for creating groups