updated
added validation