P1 edited

p1 pointer is initialized with NULL