added bot state and persistence, but it sucks