Added case where no histogram is provided.