implement user variable serialization