adjusted for iOS 7