initial implementation of roundtripping