Change functionality of Router class