use epsilon parameter for fudge factor
remove debugging nan check