extracted router init from bootstrap