first version of the server to handle multiple clients via threads