added server and connection logic