Avoiding deprecated code