writing .pd files