compose dataflow and router components so routing is unnecessary in main function