Adding Nick Becker's p_wrapper