converting to parser implementation