update code x position