add option to set epsilon