implement horner_rule problem