Why 1e-6 hardcoded? Why not allow the user to implement their own epsilon, but have this as default?