began to integrate server into main.py