Update main.py

continued restore function...