some updates
adjusted the tolerance value