removes code complexity from users controller