refactoring test environment into a struct