moved parts of i2c file to header