updated stack duplication