finished the database.js