Moved dht code ti lib