simulator refactored as objects
conflicts resolved