restructuring in tests