Updated Bot with chunking code