add a method to Router class