updates to use postgresql