add first sample with a doubly-nested loop