debugging encoding