update to reflect i2c library changes
refactoring