updated to support iOS 6.1