Added final logic to handle stacking boxes.