take an array or rewrite rules