fixed the looping problems, changed the arrays