condensed i2c code