change deprecated variable to new alternative method.