added validation

added validation