starting to get the codec functions put in