hist -> histogram. bar widths were wrong because used range instead of [range].