enhancement in main script so that no crashing happens if simulation is running for zero time