added response code to delete function