converted from commonjs to requirejs
added mongodb support