modified quash.cpp