add branching ratio auto adjust
add similar work for L line