update data structure in mongo