Update sample1, so it can support three levels