modified histogram algorithms