dealt with the first connection part