added line detection