added return type and parameters for validate method