adding methods to parser class