add timer to update graph regularly