Replaced some deprecated methods