adding check for iOS 7