finished scale function
use scale