this works, but will break if there is more than 1 usePrevPhase for a single phase name in the same session