added shrink_to_fit function