changed loop idk if this works