server.py refactored