Updated along with AdvancedSearch.java

made changes for advanced search feature to work