update to use postgres