corrected a script to generate character sample