change the scale method to fit window width