added nested looping example