add code to support rules in automated tests