fixed buggs and hopefully correct values in testord4