implemented res.location