remove duplicate writing of partial-expansion (still not working - SNW)