added tablet functionality