no longer rely on a switch to assign routes
assign routes by ref to save memory...