beginning to modify search logic and add in Spock for unit testing