Begun line finding algorithm