Adds scale function.