added support for marshaling and unmarshalling of basic types