Added link weights support