How to write externals for pd