BREAKING: changed depricated calls to errors