Added code for server connections