delete function now working. the directory now completely functions