updated run and rewrite rules