added calculations of intensities