tests refactored.