add a UI which pushes the given events then exits