work on codec mode