took 2 hours to succesfully implement this edit method. Program no
longer crashes