first implementation of unformatted search and all the playing around to lead up to that