updated deprecated function call