added offset and rotate keywords to optimize