Edit function added