add validation method