Added some to the delete function