simulator refactorointia