tests and config rewrite