added iOS version checks