added assertion in Parser