updated the shell function