Added logic of the one run simulator