Added histogram heuristi check