working up to line detcetion, starting clustering