documenting histogram generation