added a tollerance check on closeness of points before sending them on from the input window