Testing code with tablet
Modified to work with MySQL