connecting code