add validation check