update histogram and view