encode corrected