updated to use own httpclient lib