added an edit method