removed useless stuff from httpRequest & refactored it