extract router into separate file