bugfix for max min values + new print histogram feature