housekeeping
some detect_boundary logic moved into determine_absolute_line_index method