changed from writexyz to writeexyz