updated edit method to use the correct param