move codecs to generator rather than operator scope