refactored to use query params and a search model