move encoding line according to comment in PR