working line finder, needs to fix candidate measure