working version of bot, code clean up next