modify gem best_in_place