finish the equalizeHist