implement spurgat logic