added in a codec to help with encoding