modified Router.php