Changed demo to make the range of time steps to use a variable that can be passed