config the router and optimise the stats