added assert to parser