treating errors