Added BhattacharyyaDistance function