pat advance 1046 added, must record distance from the start point