updating index with canvas code