added Edit function