controlling a character