add the router config function