changed app to use psql