server.py updated with three threads