Updated WriteXY