scale and transform g