new bot code rework