added timestep function, output functionality next