minor improvements to bot logic