calculate_ses functionality and documentation 1