two fold for loop