merged mb3 code to current main