add a method to select m in n elements and return their indices.