added function removeSpy in HQ.cpp