updated stack realization