Updated the template to use the scale function