improving the find-chord method