imroved line combo logic