added tolerance