Making changes to use postgres