replaced many errors with ErrorT