add a router function