switched to pg from sqllite