better pp for function