used enabled to interrupt simulation
refactoring some things