Added function to calculate brillouin's index