moving all of the calls to the a rule function