streamlined histogram calculation through bulk replace
removed obsolete pending calculation db