Thread-based server works