changed the way Rules is organized
modified script to run