added pop functionality