added xOffset yoffset and scale for mapping