calculate balance function correctly
calculate balance function ignoring species