added improved histogram array and fixed some plotting