Implemented scaling.