use a proper loop and iterator because why not