added amount_rule class and spec for it