added base modbus code