Updated deprecated code