Change the loop syntax, still running too slow.