added scale and rotate support