added validation check