added test option, added debug code, gor rid of needless else statement in cuda shift functions