refactor Router::process