Edit function

edit function finshed