switched to using pymongo rather than REST interface