fixed minor problem
added validation
validation