working with connecting with the server