update

moved all functions from main to kademlia