exit and reset parsing added