def get_common_tables(old_conn, new_conn):    
    """ a comparison function which checks for tables with the same name
    :param 
        old_conn: the connection to the old db
        new_conn: the connection to the new db
    :return: A list of table names
    """

    list_table_query = "select name from sqlite_master where type = 'table'"

    old_conn.row_factory = lambda cursor, row: row[0]
    new_conn.row_factory = lambda cursor, row: row[0]

    old_cursor = old_conn.cursor()
    new_cursor = new_conn.cursor()

    old_tables = old_cursor.execute(list_table_query).fetchall()
    new_tables = new_cursor.execute(list_table_query).fetchall()

    # no need for any fancy optimized algorithms since this is always O(n). list has no repeated items
    return [value for value in new_tables if value in old_tables]