Replacing the deprecated functions.