Changing of edit function

change of edit function due to error