serialization on categories