small update
refactor serialization, support circular reference