updating canvas