added nested loop