halfway done, check comments in main.py