Global Variables and Correct Function Call