update histogram to work with pandas