upgrade deprecated code, but please don't use these methods any more