first round of mc refactoring