parser updated to support quit function