modify posX posY to posx, posy when generating