change rules param to give it to the run method and make filenames possible