refresh canvas index every 5 seconds