added https support and more tests