added pop method