made scale cross-browser compatible