update server.py so that tcp server can run separately