added marshaling code for all basic types