Redundant code in pop