working on Edit function