checkpointing primitive type work