added marshalling helper functions