update drawing method