Added pop method and unit test