updated deprecated code