get mongo working on write.py