streamlined the testing functions.