regular router based on casca(An state-based router library)