added realtime implementation