revert encode