replaced deprecated code usage