added tollerance to n=0 case