changed sqllite to pg