making categories serialisable