Now first checking for tablet, then mobile