added linear regression to predict x value

This is an attempt to account for tilted shred edges, although the
results are only slightly improved