fixed some minor issues such file path and runif(0) to unifrnd(0,1)