Modified deprecated function call