add short cut when find distance is 1