finished the p_wrapper assignment