     override func collectionView(_ collectionView: UICollectionView,
                                  layout collectionViewLayout: UICollectionViewLayout,
                                  sizeForItemAt indexPath: IndexPath) -> CGSize {
+        //self.collectionView.collectionViewLayout.invalidateLayout()
+        
         let width = storeCollectionView.bounds.size.width / 2 - 5
         let height = width
         return CGSize(width: CGFloat(width), height: CGFloat(height))

        
        //in app purchases have arrived so refresh the collection view
        collectionView.reloadData()
    }
    
    

        lockAllExpiredPerks()
        
        collectionView.reloadData()
        self.collectionView.collectionViewLayout.invalidateLayout()
    }
    
    /******************************************************/
