basic line detection