extracting jsdomParser - will probably be reusable