i is not declared and will end up being global