Modified my_counting_method and created shuffle_method.