Added Server and Client function