Completed generating weights. TODO Change graph structure to allow for selfweight