First working version with both weights to get the two desired distributions