refactored DHT