add serialize func in SSSP class