moved from sqlite3 to postgresql for heroku compatibility