Created convienience method for conneting to a server