cross line detection