Added a search function (not fully working)

So far it only works if the hash was in the initial set of endpoints,
so the algorithm needs a lot of work