add mongodb and test code