function vpath = flstDecode(d)

nFrame = min([d.memory, d.updateCount]);
psi = d.psi(:,(d.memory-nFrame+1):d.memory);
vpath = zeros(1, nFrame);

% initialise backward step
[~, vpath(end)] = max(d.oldDelta);

% rest of backward step
for iFrame = (nFrame-1):-1:1
    vpath(iFrame) = psi(vpath(iFrame+1), iFrame+1);
end