refactored users_for method to use active record join