added iOS 8 support