Change to res.type