cleaned up dht printing code