added validation to AnalyzeController