implement button for edit event