changed p

p now refers to the parent