changes to sdm code