update deprecated code