add functions to p