rewrite the Router