The pupillary response as an indicator of arousal and cognition