     when "if"
       hals = [
         countExpressionHalstead statement.condition
-        countExpressionHalstead statement.block
+        countStatementHalstead statement.block
       ]
-      hals.push countExpressionHalstead statement.elseBlock if statement.elseBlock?
+      hals.push countStatementHalstead statement.elseBlock if statement.elseBlock?
       hal = combineHalsteads hals
       hal.operators.push 'if'
       hal.operators.push 'else' if statement.elseBlock?

    when "while", "do_while"
      hal = combineHalsteads [
        countExpressionHalstead statement.condition
        countExpressionHalstead statement.block
      ]
      hal.operators.push statement.statement
      hal

        hals = [
          countExpressionHalstead statement.domain
        ]
      hals.push countStatementHalstead statement.block
      hal = combineHalsteads hals
      hal.operators.push 'for'
      hal
