The effect of mental health on critical thinking