set_scaling command (and refactor)