This is some of the WORST fucking loop code I have EVER seen. Clean this shit up.