put KryoRegistrator in the same object