# Referencing function with if statement not working

**URL:** <https://forum.kirupa.com/t/referencing-function-with-if-statement-not-working/308814>\
**Category:** Uncategorized\
**Created:** [April 30, 2010, 4:46pm UTC](https://forum.kirupa.com/t/referencing-function-with-if-statement-not-working/308814 "2010-04-30T16:46:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![webguync](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/webguync/32/2434_2.png) [@webguync](https://forum.kirupa.com/u/webguync)\
**Post date:** [April 30, 2010, 4:46pm UTC](https://forum.kirupa.com/t/referencing-function-with-if-statement-not-working/308814/1 "2010-04-30T16:46:24Z")

</div>

I am trying to reference a function in an if statement and it’s not doing anything. The reference is here.

```auto

private function newNumber (qTotal:Number, curNum:Number):Number {
            var newNum:Number = Math.floor(Math.random()*qTotal);
            
            for (var j:Number=0; j<curNum; j++) {
                if (randomizedOrder[j] == newNum) {
                    return newNumber(qTotal, curNum);
                }
            }
            return newNum;
            
            if (newNum > 35)
            {
                stopTiming();
            }
        }

```

and the stopTiming function is in a different package and looks like this.

```auto

internal function stopTiming():void {
            timer.stop();
        }

```

is it b/c I am trying to reference an internal function?
