refactor MB class
make dynamic