replaced iOS 6 deprecated calls