modify pcell example code