fixed db.js