optimize traversing through req.