the parser class that works fine