Updated deprecated method.