Changed time indices so it now iterates over multiple time steps