update and cancel button