-improvement to serialize version of context objects