rewrite config parsing (inverse order)