encode debugging