Updated depreciated code