change for-loop