more efficient marshalling