cross section calculation macro