separate stack into a component