Adding part of gui.py