implemented the scale mode