Updating scheme
More correct casting