added functionality for DHT

and skeletons for load and save state // work in progress