add some unit tests for allowed errors