switched painting loops to explicit iterator