updated lockstep code