changed err threshold