added several functions
use histogram_type in binning subroutine
add init_histogram