added to check line cross