added marshalling of objects