Example showing how global variables can cause problems