trim deprecated code