fixed scope bug in server.py by using globals (ew)