before switching to UIcollectionview