[enh] replaced deprecated code