refactored the user search