Added changes for real-time mode