Created delete function