updated line detection segment