histogram adapt hook