rewrite and debug the function get_operator_name.