Swapped parameters to stor because the evaluation of pop() in the ported codes seems to have swapped.