remove inner loop