aded validate method