updated deprecated function