added iOS 5.0+ support