updating to use postgres db