Shorten for loop