use AbstractStackable to simplify the logic.