refactor user/group creation