defined edit method