support https and change some method name