switched out sqlite3 with pg