Set variable "i" within functions instead of within quizVariables object