fork from : https://github.com/sunjw/adchs