Updated Serve and Client and work with Threads