changed HTTP connection method