add util/plot_distribution.py, and some changes