updated for iOS7