refactored get_available_users method