reduced realtime api call to 1 call