fixing callback function for realtime