modified root.py