adding support for iOS 6.1 and onwards