Updates to script... it should work in MonogDB...