changed to use the postgresql database