working on looping only what's needed