implement parser class