updates to write_plink