changed best.r to have actual code