changed character state to have a return value