added histogram() and get_median()