switched from sqlite to pg