revise example to review pop() in detail