getWeights method