some optimizations in MP