moved database.js to workspace