Implemented parsing in cpp