updated the edit function
updated the edit function