added iOS8 support