added statistical weights and possibility to use one of the bins as target
updated doc