Update from deprecated function