changed output statement in p_add