Replace depricated methods