implement the tablet fucntion