question 3.3

modify the pop() function