Double loop example