how do the respiratory and circulatory system work together?