here is the first iteration of best.R : simple input error checking