various updates for mxdb and specialize
-added some stuff to handle more than two mixture