minor refactor in botstate