Add step size calculation (offset optimization still not working)