implement a rudimentary functional search