refactored the adding of users to the scope