add named results function and its test, SwapNR()