modified shell.py