changed more sqlite3 calls with dbi