changes to search algo