updating figure