started javascript code for mongodb