pshell function