add encoding generator (1/2)