added histogram equalization