added isTablet condition