add curly braces around return in validate method