tests refactored - pass