added proper realtime api