adds primitives serialization