improvement the functional in the button edit