moved bot loop into bot class