adding a refactoring to MarketSImulator