replaced sqlite3 with dbi calls, merged with latest 1.63