Added finBestScale function.