Touch line Matching Algorithm