changed from using sqlLite to using PG