implemented routing feature