added support for multiple codecs