update lib to support isTablet