nested loops testing