DhChain corrected some error + added some functions