wrote functions to add to hazard pointer and defref