add https direct handler
refine entire architecture