Add edit method to todo script