add untested pop implementation