add a delete function for tqueue