Started implementation of weighting