refactored push2mongo.py