wrote parser class with tests