rewrote search to be easier to read and a bit faster. also added a readme