updated 'pop' definition and doctest