Added boolean to for loop. Still very slow. Hmm..