updated to latest version of db.js