change canvas to index