why are we passing the api around? Doesn't the rule already have the api object?