improvements to bot script