some debug and change to https