added ShellWithSock function