Refactored the search function
Removed n from the API