tol is needed in train method