Completed part 5: connecting to the service