corrected access to req.params.state