updated Rule class to use a more general Condition object