Intertwining operators and modular invariance