fuck this MySQLdb, reworked to sqlite3