empirical.R now working (more or less)