min diff method