add line detection