rewrite riutes