changed source file stacking/unstacking to save/restore the value