added parser event loop