added weights to nodes (probably)