refactored the HTTPParser