tablet detection

some bugs fixed + test scenario