change inner loop