added best_in_place