add twi library,not working right now