Adding and tested delete function