refactored frontend
changed how queries are built to better handle search request