moved Modbus code to Agent