refactor everything and make this a generic htmlparser benchmark