Added ugly histogram code