Add nested loop test