use cursor.fetchone instead of tuple