more flexible routing and more tests