Update sample to be recursive.