updated pollItem() method