now using history to improve bot