fixes #1 - add mongoDB support and add simple test cases.