first it wants the var to be at the beginning of the function. then it says do not make function within loops