Used  instead of deprecated function.