first working version of CharGenerator