changed 0.001 value to check to predefined eps