loop fixed again