stashing away SPOT for bugfixing
SPOT re-implemented (testing)
(v dot g)/(||v|| ||g||) changed to (v dot g)/(||v||) for SPOT