use tolerance value instead of 0