OS X deprecated method replaced