wrote new structure for mongodb