Assignment 9 preliminary code (before assignment)
Fixed delete code