edit method with error