refactored the userscontroller