Test nine!
No if on end and first for loop
second for loop and unnecessary curly braces gone.