Added support for variable length i2c