update for canvas