fixing up array accessing, adding realtime graph