tth step size checking code (untested)