added optional karg to filter by shannon entropy