reduce copying of potentially huge objects, tests