How to Make a Smart Stack