fiddling with R scripts and priors - but it works so I htink its time to write...