router and generator functioning