use pg instead of sqlite3