add condition histograms support
Merge pull request #28 from esteit/condition-histogram

add condition histograms support