added parameter to setCharacter()