moved from SQLite3 to PostgresQL