avoid writign to mongo on every write