added http request handling