encoding script