added function pointer to context for variable serialization strategies