almost working parser for PA5