coef implemented

added get_rule and add_coef function and implemented the apply_rule
function