figuring stuff out for https