 
 			when "FunctionDeclaration"
 				vars = []
-				calls = countCalls rootNode, node, source
+				calls = countCalls rootNode, node, source, (data, timedOut) ->
+					lines = analysis.getValue().split "\n"
+					lines[data.line - 1] = lines[data.line - 1].replace "Analyzing...", (if timedOut then "TIMEOUT" else "#{data.calls} times")
+					analysisText = lines.join "\n"
+					analysis.setValue analysisText
+					console.log analysisText
+
 				# console.log(typeOf calls)
 				# console.log(calls)
 				tryEval "#{source[node.range[0]...node.range[1]]}"
 				vars.push
-					name: node.id.name + if typeOf calls is "Number" then " (#{calls} calls)" else " (#{calls})"
+					name: "(Analyzing...)"
 					type: tryEval "typeOf(#{node.id.name})"
 
 				analysisChunk = {}

						analysisChunk.line = node.expression.loc.start.line

						returnVal = tryEval "#{source[node.expression.range[0]...node.expression.range[1]]};"
						analysisChunk.raw = "-> #{returnVal}: #{typeOf returnVal}"

						codeAnalysis.push analysisChunk



			when "ForStatement", "WhileStatement"
				vars = []
				# iterations = countIterations rootNode, node, source
				iterations = countIterations rootNode, node, source, (data, timedOut) ->
					lines = analysis.getValue().split "\n"
					lines[data.line - 1] = lines[data.line - 1].replace "Analyzing...", (if timedOut then "TIMEOUT" else "#{data.iterations} times")
					analysisText = lines.join "\n"
					analysis.setValue analysisText
					console.log analysisText

				vars.push
					name: "(Analyzing...)"
					type: node.type

				analysisChunk = {}
