fixed I2C_write function