added setting for smooth scaling.