Sample code for PNM examples