added router.prepare