update to use postgresql