adding edit method