Changed to use non deprecated method