histogram constructor, does not work