finish wirting the retrieve realtime data