saved a lot of bytes by using for instead of another function