for-loop cleanup