support adaptive stacking