roundtrip tests
refactoring in tests