registerCodec method