cleaned up generateCharacter()