some code simplifications in .testAll function