simplify library
fill_hist refactor in cython