debugging best.R