with basis functions written (only p for the moment)