nearest neighbor endowment
switch to randp from mnrnd, mlint optims