refactor three_term_operator
refactor three_term_operator