optimize generated posX.