added connect to bd and creating server