real-time functions