saves xr and yr