Added validate method