Update main.py

early draft of restore function