modified simulator core files from master branch