add fst serialization ability