Select_naive implementation