The only place where I see the 'start' variable change is when you initialized to the value of X. So if it is changing I guess X is global. As long as you're on the right track then that's good news.