Added ordered function in eval_leading_term